package jp.sourceforge.akjrcp.util;

import java.io.File;
import java.net.URL;

public class DownloadUtils {
public static File toDownloadFile(File baseDir,URL url){
String path=url.getHost();
String paths[]=url.getPath().split("/");

for (int i = 0; i < paths.length; i++) {
	path+="\\"+paths[i];	
	}

if(paths[paths.length-1].indexOf(".")==-1){
	path+="\\"+"index.html";
}
return new File(baseDir,path);
}

}
